<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib prefix="sys" uri="/WEB-INF/tld/sys.tld" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>逾期催收-应收金额明细</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="sqPanel" style="margin-bottom: 5px;">
        <div class="sqPanel_head" style="height:35px;">
            <table class="table_full">
                <tr>
                    <td><b>应收总金额合计(元): </b><span id="arAmt">&yen;${arAmt}</span></td>
                    <td><b>逾期金额合计(元): </b><span id="ovdAmt">&yen;${ovdAmt}</span></td>
                    <td><b>罚息金额合计(元): </b><span id="fineAmt">&yen;${fineAmt}</span></td>
                </tr>
            </table>
        </div>
        <div class="sqPanel_body">
            <div id="ligergrid1" class="sq-grid"></div>
        </div>

    </div>
</div>



<script type="text/javascript">
    var grid = null, form = null;
    $(function () {
        var cstId = "${cstId}";
        var prjId = "${prjId}";
        var paySchId = "${paySchId}";
        grid = $("#ligergrid1").ligerGrid({
            url: '<%=path%>/risk/overdueCollect/initOverduePaySchDList.do?queryType=1',
            parms:{cstId:cstId,prjId:prjId,paySchId:paySchId},
            method: 'get',
            columns: [
                {display: '支付表号', name: 'paySchNo', minWidth: 140, align: 'left', enabledSort: false},
                {display: '应收类型', name: 'payPd', width: 140, align: 'right', enabledSort: false,render:function(rowdata){
                    return "第"+rowdata.payPd + "期租金";
                    }},
                {display: '应还日期', name: 'payDt', width: 140, align: 'right', enabledSort: false,render:renderDate},
                {
                    display: '租金', name: 'feeAmt', width: 140, align: 'right', enabledSort: false,
                    render: function (rowdata, index, value) {
                        return '&yen;' + FormatMoney(rowdata.feeAmt / 100);
                    }
                },
                {
                    display: '实付款', name: 'paidUpAmt', width: 140, align: 'right', enabledSort: false,
                    render: function (rowdata, index, value) {
                        return '&yen;' + FormatMoney(rowdata.paidUpAmt / 100);
                    }
                },
                {
                    display: '逾期金额', name: 'arAmt', width: 140, align: 'right', enabledSort: false,
                    render: function (rowdata, index, value) {
                        return '&yen;' + FormatMoney(rowdata.arAmt / 100);
                    }
                },
                {display: '逾期天数', name: 'ovdDays', width: 140, align: 'right', enabledSort: false},

            ],
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            allowUnSelectRow: true,
            alternatingRow: false,
        });
        grid.setHeight(100);



        getOvdAmtSummary();

        $("#pageloading").hide();
    });


    //格式化时间
    function renderDate(rowdata, index, value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
        }
        return dateStr;
    }
</script>

</body>
</html>
